/**
 * 
 */
package com.java.test.audit.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

/**
 * @author 提款审核
 *
 */
public class DrawingExamineInfo implements RowMapper<DrawingExamineInfo> {

	// 主键id
	private int id;

	// 游戏账号
	private String gameAccount;

	// 所属分层id
	private int sliceValue;

	// 分层名称
	private String sliceName;

	// 提款金额
	private double drawingAmount;

	// 提款时间
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime drawingTime;

	// 提款方式 -- 提款渠道
	private int drawingChannelValue;

	private String drawingChannelName;

	// 提款账号
	private String drawbankAccount;

	// (0:未审核,1:审核通过，2：审核不通过) -- 审核状态 -- 默认未审核
	private int status = 0;

	// 打码量  1： 已经完成 2：未完成
	private int codeStatus;

	// 审核人
	private String reviewer;
	
	
	private String orderNumber;

	// 备注
	private String content;
	
	// 游戏唯一标识
	private String gameUniqueId;
	
	
	// 手续费
	private double sxfCharge;
	
	//到账金额
	private double dzjeAmount;
	
	

	public double getSxfCharge() {
		return sxfCharge;
	}

	public void setSxfCharge(double sxfCharge) {
		this.sxfCharge = sxfCharge;
	}

	public double getDzjeAmount() {
		return dzjeAmount;
	}

	public void setDzjeAmount(double dzjeAmount) {
		this.dzjeAmount = dzjeAmount;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	
	

	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getGameAccount() {
		return gameAccount;
	}

	public void setGameAccount(String gameAccount) {
		this.gameAccount = gameAccount;
	}

	public int getSliceValue() {
		return sliceValue;
	}

	public void setSliceValue(int sliceValue) {
		this.sliceValue = sliceValue;
	}

	public String getSliceName() {
		return sliceName;
	}

	public void setSliceName(String sliceName) {
		this.sliceName = sliceName;
	}

	public double getDrawingAmount() {
		return drawingAmount;
	}

	public void setDrawingAmount(double drawingAmount) {
		this.drawingAmount = drawingAmount;
	}

	public LocalDateTime getDrawingTime() {
		return drawingTime;
	}

	public void setDrawingTime(LocalDateTime drawingTime) {
		this.drawingTime = drawingTime;
	}

	public int getDrawingChannelValue() {
		return drawingChannelValue;
	}

	public void setDrawingChannelValue(int drawingChannelValue) {
		this.drawingChannelValue = drawingChannelValue;
	}

	public String getDrawingChannelName() {
		return drawingChannelName;
	}

	public void setDrawingChannelName(String drawingChannelName) {
		this.drawingChannelName = drawingChannelName;
	}

	public String getDrawbankAccount() {
		return drawbankAccount;
	}

	public void setDrawbankAccount(String drawbankAccount) {
		this.drawbankAccount = drawbankAccount;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getCodeStatus() {
		return codeStatus;
	}

	public void setCodeStatus(int codeStatus) {
		this.codeStatus = codeStatus;
	}

	public String getReviewer() {
		return reviewer;
	}

	public void setReviewer(String reviewer) {
		this.reviewer = reviewer;
	}

	public String getGameUniqueId() {
		return gameUniqueId;
	}

	public void setGameUniqueId(String gameUniqueId) {
		this.gameUniqueId = gameUniqueId;
	}

	@Override
	public DrawingExamineInfo mapRow(ResultSet rs, int rowNum) throws SQLException {

		DrawingExamineInfo info = new DrawingExamineInfo();
		info.setId(rs.getInt("id"));
		info.setGameAccount(rs.getString("game_account"));
		info.setSliceName(rs.getString("slice_name"));
		info.setSliceValue(rs.getInt("slice_value"));
		info.setDrawingAmount(rs.getDouble("drawing_amount"));
		info.setDrawingChannelName(rs.getString("drawing_channelname"));
		info.setDrawingChannelValue(rs.getInt("drawing_channelvalue"));
		info.setDrawingTime(
				rs.getTimestamp("drawing_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		info.setDrawbankAccount(rs.getString("draw_bankaccount"));
		info.setStatus(rs.getInt("status"));
		info.setCodeStatus(rs.getInt("code_status"));
		info.setReviewer(rs.getString("reviewer"));
		info.setOrderNumber(rs.getString("order_number"));
		info.setContent(rs.getString("content"));
		
		info.setGameUniqueId(rs.getString("game_unique_id"));
		
		
		info.setSxfCharge(rs.getDouble("sxf_charge"));
		info.setDzjeAmount(rs.getDouble("dzje_amount"));
		
		return info;
	}

}
